Routines (alphabetical) > Dot Commands > .COMPILE

.COMPILE

The .COMPILE command compiles and saves procedures and programs in the same manner as .RUN . If one or more filenames are specified, the procedures and functions contained therein are compiled but not executed. If you enter this command at the Command Line of the workbench and the files are not yet open, IDL opens the files within Editor windows and compiles the procedures and functions contained therein.

See RESOLVE_ROUTINE for a way to invoke the same operation from within an IDL routine, and RESOLVE_ALL for a way to automatically compile all user-written or library functions called by all currently-compiled routines.

If the -f flag is specified, File is compiled from the source stored temporarily in TempFile rather than on disk in File itself. This allows you to make changes to File (in an IDL editor window, for example), store the modified source into the temporary file (the IDL Workbench does it automatically), compile, and test the changes without overwriting the original code stored in File.

On UNIX systems, .COMPILE will interpret the $ (dollar sign) character as a reference to an environment variable, and expand the variable as is normal for the operating system. To use a literal dollar sign in a file name, escape the $ character with a backwards slash character ( \$ ).

Note: .COMPILE is an executive command. Executive commands can only be used at the IDL command prompt, not in programs.

Syntax

.COMPILE [File1, ..., Filen]

.COMPILE -f FileTempFile

See Also

.RNEW, .RUN